package com.springboot.demo.lock.user;

import com.springboot.common.lock.LockFactory;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 获取各种锁的工厂类
 *
 * @author supu
 * @date 2019-03-25 10:17
 **/
@Component
public class MultiLockFactory {
    @Autowired
    private LockFactory lockFactory;

    public UserLock getUserLock(List<Integer> userIds) {
        return new UserLockImpl(lockFactory, userIds);
    }
}
